<?php


 
	// username and password sent from form 

	$id=$_POST['tran_id']; 
	//$id=93;
	echo $id."<br>";
	if(isset($_POST['tran_id'])){
		$parameters=array($id,'@p1');
		$sqlResult=storedProcedure('_deny_transaction',$parameters);

		$row = mysql_fetch_array($sqlResult);

	    if(!isset($row)){
	    	 error_log("kevin test bad data", 0);
			header("location:../index.php?page=manage_transaction&stat=error&error=badData");
		}elseif($row['result']!=1){
			header("location:../index.php?page=manage_transaction&stat=error&error=blocked");
	    	echo "deny fail";
	    }else{
	    	header("location:../index.php?page=manage_transaction&stat=denied");
		
	    }
		return;
	}else{
		echo "no id";
		header("location:../index.php?page=manage_transaction&stat=error&error=missing");
		return;
	}

	return;


	// Register $myusername, $mypassword and redirect to file "login_success.php"
	//
	//print_r($_SESSION);
	//header("location:../index.php?page=manage_users");

?>
